package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ly.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.CarCardManageMapper;
import com.ly.heart.domain.CarCardManageEntity;
import com.ly.heart.service.ICarCardManageService;
import javax.annotation.Resource;

/**
 * 车务充值下发信息Service业务层处理
 *
 * @author cxl
 * @date 2024-09-08
 */
@Service
public class CarCardManageServiceImpl extends ServiceImpl<CarCardManageMapper,CarCardManageEntity> implements ICarCardManageService {

    @Resource
    private CarCardManageMapper carCardManageMapper;

    /**
     * 查询车务充值下发信息
     *
     * @param id 车务充值下发信息ID
     * @return 车务充值下发信息
     */
    @Override
    public CarCardManageEntity selectCarCardManageEntityById(String id)
    {
        return carCardManageMapper.selectCarCardManageEntityById(id);
    }

    /**
     * 查询车务充值下发信息列表
     *
     * @param carCardManageEntity 车务充值下发信息
     * @return 车务充值下发信息
     */
    @Override
    public List<CarCardManageEntity> selectCarCardManageEntityList(CarCardManageEntity carCardManageEntity)
    {
        return carCardManageMapper.selectCarCardManageEntityList(carCardManageEntity);
    }

    /**
     * 新增车务充值下发信息
     *
     * @param carCardManageEntity 车务充值下发信息
     * @return 结果
     */
    @Override
    public int insertCarCardManageEntity(CarCardManageEntity carCardManageEntity)
    {
        carCardManageEntity.setCreateTime(DateUtils.getNowDate());
        return carCardManageMapper.insertCarCardManageEntity(carCardManageEntity);
    }

    /**
     * 修改车务充值下发信息
     *
     * @param carCardManageEntity 车务充值下发信息
     * @return 结果
     */
    @Override
    public int updateCarCardManageEntity(CarCardManageEntity carCardManageEntity)
    {
        carCardManageEntity.setUpdateTime(DateUtils.getNowDate());
        return carCardManageMapper.updateCarCardManageEntity(carCardManageEntity);
    }

    /**
     * 批量删除车务充值下发信息
     *
     * @param ids 需要删除的车务充值下发信息ID
     * @return 结果
     */
    @Override
    public int deleteCarCardManageEntityByIds(String[] ids)
    {
        return carCardManageMapper.deleteCarCardManageEntityByIds(ids);
    }

    /**
     * 删除车务充值下发信息信息
     *
     * @param id 车务充值下发信息ID
     * @return 结果
     */
    @Override
    public int deleteCarCardManageEntityById(String id)
    {
        return carCardManageMapper.deleteCarCardManageEntityById(id);
    }
}
